/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package lianxishilili.demo;

import java.util.Enumeration;
import java.util.Hashtable;

/**
 *
 * @author Administrator
 */
public class MapDemo {
    public static void main(String[] args) {
        Hashtable a=new Hashtable();
        a.put("john",new Integer(90));
        a.put("杨过",new Integer(100));
        a.put("小龙女",new Integer(100));
        
        System.out.println("hashtable的内容是：");
        System.out.println(a);
        
        Enumeration b=a.elements();
        while(b.hasMoreElements()){
            Integer tmp =(Integer) b.nextElement ();
            System.out.println(tmp.intValue()+"");
        }
        System.out.print("john的成绩是：");
        System.out.println(a.get("john"));
    }

}
